<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <!-- 
    路由是什么? 本质上就是映射关系 组件和路径的对应关系

    new VueRouter({
      routes: [
       { path: '/login', component: Login, name: 'login'},
       { path: '/404', component: 404组件, name: '404' },
       { path: '/', redirect: '/dashboard', component: Layout架子, 
        children: [
          { path: '/dashboard', component: Dashboard组件, name: 'dashboard' },
          { path: '/departments', component: 组织架构的组件, name: 'departments'},
          { path: '/employees', component: 员工组件, name: 'employees' },
          { path: '/importUser', component: 导入员工组件, name: 'importUser' },
          { path: '/details', component: 员工详情组件, name: 'details' },
          { path: '/adjustPost', component: 员工调岗组件, name: 'adjustPost' },
          { path: '/leave', component: 员工离职组件, name: 'leave' },
          { path: '/settings', component: 公司设置组件, name: 'settings' },
          { path: '/permissions', component: 权限设置组件, name: 'permissions'},
          { path: '/social', component: 社保组件, name: 'social' },
          { path: '/attendances', component: 考勤的组件, name: 'attendances'},
          { path: '/salarys', component: 工资的组件, name: 'salarys'},
          { path: '/approvals', component: 审批的组件, name: 'approvals'},
        ] 
      },
      ]
    })

    权限系统: 假设用户没有查看员工列表的权限,那就意味着这个用户不能查看所有关于员工的页面


    new VueRouter({
      routes: [
       { path: '/login', component: Login, name: 'login'},
       { path: '/404', component: 404组件, name: '404' },
       a,
       b
      ]
    })

    const a = { 
      path: '/', redirect: '/dashboard', component: Layout架子, 
        children: [
          { path: '/dashboard', component: Dashboard组件, name: 'dashboard' },
        ] 
      },
      const b = { 
        path: '/employees', component: Layout架子, 
        children: [
          { path: '/employees', component: 员工组件, name: 'employees' },
          { path: '/importUser', component: 导入员工组件, name: 'importUser' },
          { path: '/details', component: 员工详情组件, name: 'details' },
          { path: '/adjustPost', component: 员工调岗组件, name: 'adjustPost' },
          { path: '/leave', component: 员工离职组件, name: 'leave' },
        ] 
      },

      我们这个项目的路由规则 要拆分模块, 因为涉及到权限处理





      new Router({
        routes: [
          {1},
          {2},
          {3},
          {7},
        ]
      })

    let a =   [ {4},  {5}, {6},]
         
          
   -->
</body>
</html>